<?php
//Yii::import('application.components.auction.class.AuBehavior');
/**
 *
 * @author luhaoz
 * @method public create
 * @method public find
 * @method public update
 * @method public delete
 */
class AuctionDao{
	public $id;
	public $title;
	public $tag;
	public $short_description;
	public $description;
	
	public $value_price;
	public $vendor_price;
	public $shipping_fee;
	public $auction_fee;
	
	public $initial_price;
	
	public $start_time;
	public $end_time;
	public $winner_pirce;
	public $winner_time;
	public $winner_id;
	public $status;
		
	public $promo_bids;
	
	protected $_dataSource;
	protected $_dispatcher;
	protected $_behavior;
	
	public function __construct(){
	    $this->buildDataSource();
	}
	
    public function dataSource(){
        return array(
            array(array(
                'id','title','tag','short_description'
            ),'application.components.auction.dataSource.AuInfo'),
            array(array(
                'start_time','end_time','winner_pirce','winner_time','winner_id','status'
            ),'application.components.auction.dataSource.AuPool'),
        );
    }
    
    public function create(){
        
    }
    
    public function update(){
        
    }
    
    public function find(){
        
    }
    
    public function delete(){
        
    }
    
    
    protected function buildDataSource(){
        $dataSource = $this->dataSource();
        foreach ($dataSource as $dataSourceConfig){
            $className = Yii::import($dataSourceConfig[1]);
            $dataSource = new $className();
        }
        //Yii::import();
    }
    
    /*
    public function behavior(){
        return array(
            'create'    => '',
            'find'      => '',
            'update'    => '',
            'delete'    => '',
        );
    }
    */

	
}